//login.js
//获取应用实例
var app = getApp();
Page({
  data: {
    remind: '加载中',
    angle: 0,
    year: 2017,
    userInfo: {}
  },
  
  goToIndex:function(){
    wx.switchTab({
      url: '/pages/index/index',
    });
  },
  onLoad:function(){
    this.setData({
      year: new Date().getFullYear()
    });
  },
  onShow:function(){
    console.log('onShow')
    var that = this
    app.getUserInfo(function (userInfo) {
      that.setData({
        userInfo: userInfo
      })
    })
  },
  onReady: function(){
    var _this = this;
   
    // wx.setTabBarItem({
    //   index: 0,
    //   text: '订单',
    //   iconPath: '/path/to/iconPath',
    //   selectedIconPath: '/path/to/selectedIconPath'
    // })
  },
});